
class Animal():
    def __init__(self, a, b) -> None:
        self.a = a
        self.b = b
        self.fun = {
            "a1": AA,
            "b1": BB,
            "c1": CC
        }

    def run(self):
        for item in self.fun:
            self.fun[item](self.a, self.b).run()


class AA():
    def __init__(self, a, b) -> None:
        self.a = a
        self.b = b

    def run(self):
        print(self.a + self.b)
        return

class BB():
    def __init__(self, a, b) -> None:
        self.a = a
        self.b = b

    def run(self):
        print(self.a - self.b)
        return


class CC():
    def __init__(self, a, b) -> None:
        self.a = a
        self.b = b

    def run(self):
        print(self.a * self.b)
        return


if __name__ == '__main__':
    obj = Animal(12, 3)
    obj.run()
